package com.mzx.javase.thread;

/**
 * 类描述：自定义类，实现Runnable接口，并重写run()方法
 *
 * @ClassName MyRunnable
 * @Description TODO
 * @Author 马子鑫
 * @Date 2022/8/1 14:47
 * @Version 1.0
 */
public class MyRunnable implements Runnable{
    private int ticket = 12;
    @Override
    public void run() {
        for (int i = 0; i < 3; i++) {
            System.out.println(Thread.currentThread().getName()+"还剩余：" + (ticket--));
        }
    }
}
